package com.example.zyghfeedback;

import android.content.Context;
import android.content.SharedPreferences;

public class SharePreferenceUtil {
    private SharedPreferences mSharedPreferences;
    private static SharedPreferences.Editor editor;
    private static SharePreferenceUtil mPreferenceUtils;

    public SharePreferenceUtil(Context context) {
        mSharedPreferences = context.getSharedPreferences("save", Context.MODE_PRIVATE);
        editor = mSharedPreferences.edit();
    }

    public static synchronized SharePreferenceUtil getInstance(Context cxt) {
        if (mPreferenceUtils == null) {
            mPreferenceUtils = new SharePreferenceUtil(cxt);
        }

        return mPreferenceUtils;
    }


    public String geted_fj() {
        return mSharedPreferences.getString("seted_fj", "");
    }


    public void seted_fj(String text) {
        editor.putString("seted_fj", text);
        editor.commit();
    }

    public String geted_idea() {
        return mSharedPreferences.getString("seted_idea", "");
    }


    public void seted_idea(String text) {
        editor.putString("seted_idea", text);
        editor.commit();
    }


}
